<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:tool="http://www.springframework.org/schema/tool" xmlns:p="http://www.springframework.org/schema/p"
	xsi:schemaLocation="
	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
	http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
	http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
	http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool-3.2.xsd"
	default-lazy-init="false">
<#if businessCode == (moduleMapperKey?cap_first)>
<#list moduleMapper.businessMap?values as localBusiness>
<#if (localBusiness.code!) != (moduleMapperKey?cap_first)>
	<import resource="applicationContext-${localBusiness.code?cap_first}.xml" />
	
</#if>
</#list>
</#if>
	<!-- ${businessMapper.name!businessCode} -->
	<bean id="${packageCode}.${moduleMapperKey}.dao.${businessCode}JdbcDao" class="${packageCode}.${moduleMapperKey}.dao.${businessCode}JdbcDao"
		parent="daoTemplate">
	</bean>
	
	<alias name="${packageCode}.${moduleMapperKey}.dao.${businessCode}JdbcDao" alias="${packageCode}.${moduleMapperKey}.dao.${businessCode}Dao"/> 

	<!-- ${businessMapper.name!businessCode} -->
	<bean id="${packageCode}.${moduleMapperKey}.service.${businessCode}DefaultService"
		class="${packageCode}.${moduleMapperKey}.service.${businessCode}DefaultService">
		<property name="${businessCode?uncap_first}Dao" ref="${packageCode}.${moduleMapperKey}.dao.${businessCode}Dao" />
<#if businessCode == (moduleMapperKey?cap_first)>
<#list moduleMapper.businessMap?values as localBusiness>
<#if (localBusiness.code!) != (moduleMapperKey?cap_first)>
		<property name="${localBusiness.code?uncap_first}Service" ref="${packageCode}.${moduleMapperKey}.service.${localBusiness.code?cap_first}Service" />
</#if>
</#list>
</#if>
	</bean>
	
	<alias name="${packageCode}.${moduleMapperKey}.service.${businessCode}DefaultService" alias="${packageCode}.${moduleMapperKey}.service.${businessCode}Service"/> 
</beans>